<%@ page import="java.util.Iterator" %>
<%@ page import="fr.mywiki.business.entry.meta.Property" %>
<%@ page import="fr.mywiki.view.web.struts.form.entry.EditEntryForm" %>
<%@ page import="fr.mywiki.business.entry.meta.datatype.text.SimpleText" %>
<%@ page import="fr.mywiki.business.entry.meta.datatype.text.WikiText" %>
<%@ page import="fr.mywiki.business.entry.meta.datatype.number.IntNumber" %>
<%@ page import="fr.mywiki.business.entry.meta.datatype.number.RealNumber" %>
<%@ page import="fr.mywiki.business.entry.meta.datatype.DateProperty" %>

<%
    EditEntryForm form = (EditEntryForm) session.getAttribute("editEntryForm");
    Iterator itFields = form.getSelectedModel().iterateProperties();
    while(itFields.hasNext()) {
      Property field = (Property) itFields.next();
      String required = "";
      if(field.bIsRequired())
        required = "*";
      String fieldName=field.getName();
%>
    <h3><%=fieldName%>&nbsp;<%=required%></h3>
<%
      String type = field.getTypeName();
      if(WikiText.TYPE_NAME.equals(type)) {
%>
		<textarea name="input_<%=fieldName%>" id="input_<%=fieldName%>"></textarea>
<%
    	} else {
%>
		<input type=text name="input_<%=fieldName%>" id="input_<%=fieldName%>"/>
<%
	    } 
    }
%>